package com.bear.sgg.springboot_11_cache.Controller;

import com.bear.sgg.springboot_11_cache.entity.Department;
import com.bear.sgg.springboot_11_cache.mapper.DepartmentMapper;
import com.bear.sgg.springboot_11_cache.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassNmae DepartmentController
 * @Description TODO
 * @Author bear
 * @Date 2020/3/17 0017 下午 6:25
 */
@RestController
public class DepartmentController {

    @Autowired
    DepartmentService departmentService;

    @GetMapping(value = "/dept/{id}")
    public Department selectDeptById(@PathVariable("id") Integer id) {
        return departmentService.selectDeptById(id);
    }
}
